<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>angular</title>
</head>
<body>
<div ng-app="myApp">
	<div ng-controller="myAppCtrl">
		
	</div>
</div>

<script type="text/javascript">
	document.getElementsByTagName('html')[0].style.fontSize=window.screen.width/10+'px';
</script>
<script src="angular.min.js"></script>
<script src="angular-ui-router.js"></script>
<script type="text/javascript">
	var app =angular.module('myApp', []);
	app.service('server', ['$http',function ($http) {
		this.get=function(){
			$http.get('data.json').then(function(res){
				return res;
			})
		}
	}])
	app.controller('myAppCtrl',function ($scope,server) {
		server.get().then(function(res){
			console.log(res)
		})
	})
</script>
</body>
</html>
<!--应该是14.11，时间-2017-05-08->